home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource5
/
305_01
/
cards.doc
< prev
next >
Wrap
Text File
|
1990-02-14
|
8KB
|
164 lines
CARD PROGRAMS FROM KITTENSOFT
POKER and BLACKJACK run on IBM or compatible computers, CGA, EGA, or
monochrome.
--------------------------------------------------------------------
BLACKJACK
Rules of blackjack, in brief:
You must place a bet before your cards are dealt.
You are dealt two cards. The dealer is dealt two cards. You can see both of
your own cards, but only one of the dealer's cards. You may "hit" (take
another card) or "stand" (not take any more cards.)
Face cards count 10 points. Aces may be counted as either 1 point or eleven
points. Other cards are worth their face value. If you go over 21 points you
"bust" and lose the hand immediately. The dealer does not draw any cards if
you bust.
After you "stand", the dealer has his turn. The dealer must draw if his total
is 16 or less. He must stand if his total is 17 or more.
The winner is whoever comes closest to 21 without going over. "Blackjack" is
EXACTLY 21 points in EXACTLY two cards. "Blackjack" beats any other hand of 21
points. Otherwise, the number of cards in a hand has no significance.
The dealer wins all ties.
TO PLAY THIS VERSION
When the program asks for your bet, type a number between 0 and 999, and then
press the "ENTER" or "RETURN" key. (999 is the maximum bet. You may bet zero
if you wish.) If you press the ENTER or RETURN key without typing a number,
the amount of your previous bet will be repeated.
When the program asks "(H)it or (S)tand" press either H or S. When the program
asks "Do you wish to play another hand?" press either Y or N.
You can improve your chances of winning by keeping track of which cards have
been played. This way you know how likely you are to be dealt a high or a low
card. When the deck becomes low all the cards are gathered together and
shuffled, and the program will announce "New deck."
--------------------------------------------------------------------
POKER
For the complete rules of poker I suggest you see Hoyle's Rules of Games. What
follows is a summary:
This program plays five-card-draw poker. The program plays 4 hands, thus
simulating the effect of a full table of 5 players.
Before every hand, every player must put an ante of 10 in the pot. After that
you are dealt 5 cards. There is a round of betting, after which each player
may discard any number of cards. You are then dealt as many cards as you have
discarded, and there is a final round of betting. There is a showdown of the
hands only if two or more hands remain in the play. If all but one have
folded, there is no showdown, and the one remaining player collects the pot.
Only those hands that are still in the play are shown.
There is no minimum requirement to open. If no player opens, everyone antes
another 10 and new cards are dealt. The chance to open the betting rotates
from player to player as successive hands are played. The player who opens in
the first round of betting has the first chance to bet in the second round of
betting.
POKER HANDS:
Straight-flush. The highest hand is a straight-flush, which is a straight all
of the same suit. In the event of two straight-flushes, the one with the
highest top card wins.
Four-of-kind. Four cards all of one rank. Between two fours-of-a-kind the one
of the higher rank wins.
Full house. Three-of-a-kind and a pair. The rank of the 3 cards takes
precedence over the rank of the pair in deciding between two full houses.
Flush. Five cards all of the same suit. Between two flushes, the one with the
highest top card wins. If the top cards are the same rank, the next card
decides, and so on.
Straight. Five cards, each one exactly one rank above its neighbor, such as
7,8,9,10,Jack. The suit is of no matter. The ace may be counted either high or
low. Between two straights, the one with the highest top card wins. An ace-
high straight is the highest straight. An ace-low straight is the lowest
straight.
Three-of-a-kind. Three cards all of one rank. Between two threes-of-a-kind the
one of the higher rank wins.
Two pair. Between two two-pair's, the one with the highest high-pair wins. If
those are equal, the one with the highest low-pair wins. If those are the
same, the one with the highest remaining card wins.
Pair. Two cards both of the same rank. Between two pairs, the higher one wins.
If they are the same rank, the highest top unmatched card wins. If those are
the same, the highest second unmatched card wins, and so on.
If no hand has any of the above, the one with the highest card wins. In the
event of a match in high cards, the next highest card decides, and so on.
In the event of a draw, the pot is split evenly. If the pot is not evenly
divisible among the drawing players, one or more chips may remain in the pot
for the next hand.
There is no precidence between suits. Thus a queen-high straight-flush in
hearts is the equal of a queen-high straight-flush in spades.
USING THIS PROGRAM:
Context-sensitive help is available all through this program. The bottom line
on the screen asks you for input. The prompt box at the top of the screen
summarizes what is wanted. You can press the question mark key at any time for
further help. You will get an explanation appropriate to the present stage of
the game. Press "H" after the question mark to see the order of precedence of
the hands.
When the program asks you to discard, use the numerals in the top row of the
keyboard to indicate which cards you wish to discard. The numeral 1 indicates
the card farthest to the left. The 2 is the next card over, and so on, up to
the 5 which indicates the card farthest to the right. Indicate ALL the cards
you wish to discard before you press the ENTER key (which is marked RETURN on
some keyboards). For each key you press, an arrow will show you the card you
have indicated. If you press a wrong key by accident, press the DEL key, and
you will be able to start over. You may discard as many card as you like, up
to all 5. If you wish to keep all your cards, press ENTER without indicating
any cards. New cards are dealt only after all players have discarded, so you
will not always see your new cards immediately after you have discarded.
Occasionally during play the program will pause to allow you to read what the
other players have done. You will be asked to press the space bar to continue.
At these times nothing is required of you but to press the space bar. These
pauses are for your benefit so you can decide your strategy based on the
betting or discarding of the other players.
--------------------------------------------------------------------
Shareware notice: BLACKJACK and POKER are shareware. Both programs are
copyright (c) 1978 and 1988 by Dan Schechter. You may make as many copies of
them as you like, and you may pass them along to your friends freely, as long
as you keep the set intact: BLACKJACK, POKER, and this document file should
all be passed on together. If you enjoy them, I encourage you to send a $5
contribution (which covers both programs). You will be supporting the concept
of play-before-you-pay software. In addition, if you find bugs in either
program, I would appreciate your detailed reports.
Thanks and good luck!
Dan Schechter
Route 1, Box 19
Amenia, North Dakota 58004
--------------------------------------------------------------------
Disclaimer: Neither I nor Kittensoft nor my cat will be responsible for the
gambling debts incurred by these programs.
Kittensoft ABSOLUTE UNCONDITIONAL no-bugs guarantee: I guarantee
unconditionally that I will be surprised if these programs have absolutely no
bugs in them.